home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK2.toast / Development Kits (Disc 2) / QuickTime / QuickTime™ 2.5 / Interfaces for Programmers / CIncludes / ImageCompression.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-26  |  50.7 KB  |  1,159 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ImageCompression.h
  3.  
  4.      Contains:    QuickTime interfaces
  5.  
  6.      Version:    Technology:    
  7.                  Release:    QuickTime 2.5 interfaces to use with ETO #20
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __IMAGECOMPRESSION__
  19. #define __IMAGECOMPRESSION__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27. #ifndef __QDOFFSCREEN__
  28. #include <QDOffscreen.h>
  29. #endif
  30. #ifndef __COMPONENTS__
  31. #include <Components.h>
  32. #endif
  33. #ifndef __WINDOWS__
  34. #include <Windows.h>
  35. #endif
  36. #ifndef __STANDARDFILE__
  37. #include <StandardFile.h>
  38. #endif
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. #if PRAGMA_IMPORT_SUPPORTED
  45. #pragma import on
  46. #endif
  47.  
  48. #if PRAGMA_ALIGN_SUPPORTED
  49. #pragma options align=mac68k
  50. #endif
  51.  
  52. struct MatrixRecord {
  53.     Fixed                             matrix[3][3];
  54. };
  55. typedef struct MatrixRecord MatrixRecord;
  56.  
  57. typedef MatrixRecord *MatrixRecordPtr;
  58. struct FixedPoint {
  59.     Fixed                             x;
  60.     Fixed                             y;
  61. };
  62. typedef struct FixedPoint FixedPoint;
  63.  
  64. struct FixedRect {
  65.     Fixed                             left;
  66.     Fixed                             top;
  67.     Fixed                             right;
  68.     Fixed                             bottom;
  69. };
  70. typedef struct FixedRect FixedRect;
  71.  
  72.  
  73. enum {
  74.     kRawCodecType                = 'raw ',
  75.     kCinepakCodecType            = 'cvid',
  76.     kGraphicsCodecType            = 'smc ',
  77.     kAnimationCodecType            = 'rle ',
  78.     kVideoCodecType                = 'rpza',
  79.     kComponentVideoCodecType    = 'yuv2',
  80.     kJPEGCodecType                = 'jpeg',
  81.     kMotionJPEGACodecType        = 'mjpa',
  82.     kMotionJPEGBCodecType        = 'mjpb',
  83.     kSGICodecType                = '.SGI',
  84.     kPlanarRGBCodecType            = '8BPS',
  85.     kMacPaintCodecType            = 'PNTG',
  86.     kGIFCodecType                = 'gif ',
  87.     kPhotoCDCodecType            = 'kpcd',
  88.     kQuickDrawGXCodecType        = 'qdgx'
  89. };
  90.  
  91. /* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
  92.  
  93. enum {
  94.     codecInfoDoes1                = (1L << 0),
  95.     codecInfoDoes2                = (1L << 1),
  96.     codecInfoDoes4                = (1L << 2),
  97.     codecInfoDoes8                = (1L << 3),
  98.     codecInfoDoes16                = (1L << 4),
  99.     codecInfoDoes32                = (1L << 5),
  100.     codecInfoDoesDither            = (1L << 6),
  101.     codecInfoDoesStretch        = (1L << 7),
  102.     codecInfoDoesShrink            = (1L << 8),
  103.     codecInfoDoesMask            = (1L << 9),
  104.     codecInfoDoesTemporal        = (1L << 10),
  105.     codecInfoDoesDouble            = (1L << 11),
  106.     codecInfoDoesQuad            = (1L << 12),
  107.     codecInfoDoesHalf            = (1L << 13),
  108.     codecInfoDoesQuarter        = (1L << 14),
  109.     codecInfoDoesRotate            = (1L << 15),
  110.     codecInfoDoesHorizFlip        = (1L << 16),
  111.     codecInfoDoesVertFlip        = (1L << 17),
  112.     codecInfoDoesSkew            = (1L << 18),
  113.     codecInfoDoesBlend            = (1L << 19),
  114.     codecInfoDoesWarp            = (1L << 20),
  115.     codecInfoDoesRecompress        = (1L << 21),
  116.     codecInfoDoesSpool            = (1L << 22),
  117.     codecInfoDoesRateConstrain    = (1L << 23)
  118. };
  119.  
  120.  
  121. enum {
  122.     codecInfoDepth1                = (1L << 0),
  123.     codecInfoDepth2                = (1L << 1),
  124.     codecInfoDepth4                = (1L << 2),
  125.     codecInfoDepth8                = (1L << 3),
  126.     codecInfoDepth16            = (1L << 4),
  127.     codecInfoDepth32            = (1L << 5),
  128.     codecInfoDepth24            = (1L << 6),
  129.     codecInfoDepth33            = (1L << 7),
  130.     codecInfoDepth34            = (1L << 8),
  131.     codecInfoDepth36            = (1L << 9),
  132.     codecInfoDepth40            = (1L << 10),
  133.     codecInfoStoresClut            = (1L << 11),
  134.     codecInfoDoesLossless        = (1L << 12),
  135.     codecInfoSequenceSensitive    = (1L << 13)
  136. };
  137.  
  138.  
  139. enum {
  140.     codecFlagUseImageBuffer        = (1L << 0),
  141.     codecFlagUseScreenBuffer    = (1L << 1),
  142.     codecFlagUpdatePrevious        = (1L << 2),
  143.     codecFlagNoScreenUpdate        = (1L << 3),
  144.     codecFlagWasCompressed        = (1L << 4),
  145.     codecFlagDontOffscreen        = (1L << 5),
  146.     codecFlagUpdatePreviousComp    = (1L << 6),
  147.     codecFlagForceKeyFrame        = (1L << 7),
  148.     codecFlagOnlyScreenUpdate    = (1L << 8),
  149.     codecFlagLiveGrab            = (1L << 9),
  150.     codecFlagDontUseNewImageBuffer = (1L << 10),
  151.     codecFlagInterlaceUpdate    = (1L << 11),
  152.     codecFlagCatchUpDiff        = (1L << 12),
  153.     codecFlagImageBufferNotSourceImage = (1L << 13),
  154.     codecFlagUsedNewImageBuffer    = (1L << 14),
  155.     codecFlagUsedImageBuffer    = (1L << 15)
  156. };
  157.  
  158.  
  159. enum {
  160.     codecNoMemoryPleaseWaitErr    = -8977
  161. };
  162.  
  163.  
  164. enum {
  165.                                                                 /* The minimum data size for spooling in or out data */
  166.     codecMinimumDataSize        = 32768L
  167. };
  168.  
  169.  
  170. enum {
  171.     compressorComponentType        = 'imco',                        /* the type for "Components" which compress images */
  172.     decompressorComponentType    = 'imdc'                        /* the type for "Components" which decompress images */
  173. };
  174.  
  175. typedef Component CompressorComponent;
  176. typedef Component DecompressorComponent;
  177. typedef Component CodecComponent;
  178. #define    anyCodec                ((CodecComponent)0)
  179. #define    bestSpeedCodec            ((CodecComponent)-1)
  180. #define    bestFidelityCodec        ((CodecComponent)-2)
  181. #define    bestCompressionCodec    ((CodecComponent)-3)
  182. typedef long CodecType;
  183. typedef unsigned short CodecFlags;
  184. typedef unsigned long CodecQ;
  185.  
  186. enum {
  187.     codecLosslessQuality        = 0x00000400,
  188.     codecMaxQuality                = 0x000003FF,
  189.     codecMinQuality                = 0x00000000,
  190.     codecLowQuality                = 0x00000100,
  191.     codecNormalQuality            = 0x00000200,
  192.     codecHighQuality            = 0x00000300
  193. };
  194.  
  195.  
  196. enum {
  197.     codecCompletionSource        = (1 << 0),                        /* asynchronous codec is done with source data */
  198.     codecCompletionDest            = (1 << 1),                        /* asynchronous codec is done with destination data */
  199.     codecCompletionDontUnshield    = (1 << 2)                        /* on dest complete don't unshield cursor */
  200. };
  201.  
  202.  
  203. enum {
  204.     codecProgressOpen            = 0,
  205.     codecProgressUpdatePercent    = 1,
  206.     codecProgressClose            = 2
  207. };
  208.  
  209. typedef pascal OSErr (*ICMDataProcPtr)(Ptr *dataP, long bytesNeeded, long refcon);
  210. typedef pascal OSErr (*ICMFlushProcPtr)(Ptr data, long bytesAdded, long refcon);
  211. typedef pascal void (*ICMCompletionProcPtr)(OSErr result, short flags, long refcon);
  212. typedef pascal OSErr (*ICMProgressProcPtr)(short message, Fixed completeness, long refcon);
  213. typedef pascal void (*StdPixProcPtr)(PixMap *src, Rect *srcRect, MatrixRecord *matrix, short mode, RgnHandle mask, PixMap *matte, Rect *matteRect, short flags);
  214. typedef pascal void (*ICMAlignmentProcPtr)(Rect *rp, long refcon);
  215. typedef pascal void (*ICMCursorShieldedProcPtr)(const Rect *r, void *refcon, long flags);
  216. typedef pascal void (*ICMMemoryDisposedProcPtr)(Ptr memoryBlock, void *refcon);
  217. typedef void *ICMCursorNotify;
  218. typedef pascal OSErr (*ICMConvertDataFormatProcPtr)(void *refCon, long flags, Handle desiredFormat, void *srcData, long srcDataSize, void **dstData, long *dstDataSize);
  219.  
  220. #if GENERATINGCFM
  221. typedef UniversalProcPtr ICMDataUPP;
  222. typedef UniversalProcPtr ICMFlushUPP;
  223. typedef UniversalProcPtr ICMCompletionUPP;
  224. typedef UniversalProcPtr ICMProgressUPP;
  225. typedef UniversalProcPtr StdPixUPP;
  226. typedef UniversalProcPtr ICMAlignmentUPP;
  227. typedef UniversalProcPtr ICMCursorShieldedUPP;
  228. typedef UniversalProcPtr ICMMemoryDisposedUPP;
  229. typedef UniversalProcPtr ICMConvertDataFormatUPP;
  230. #else
  231. typedef ICMDataProcPtr ICMDataUPP;
  232. typedef ICMFlushProcPtr ICMFlushUPP;
  233. typedef ICMCompletionProcPtr ICMCompletionUPP;
  234. typedef ICMProgressProcPtr ICMProgressUPP;
  235. typedef StdPixProcPtr StdPixUPP;
  236. typedef ICMAlignmentProcPtr ICMAlignmentUPP;
  237. typedef ICMCursorShieldedProcPtr ICMCursorShieldedUPP;
  238. typedef ICMMemoryDisposedProcPtr ICMMemoryDisposedUPP;
  239. typedef ICMConvertDataFormatProcPtr ICMConvertDataFormatUPP;
  240. #endif
  241. typedef long ImageSequence;
  242. typedef long ImageSequenceDataSource;
  243. typedef long ImageTranscodeSequence;
  244. typedef long ImageFieldSequence;
  245. struct ICMProgressProcRecord {
  246.     ICMProgressUPP                     progressProc;
  247.     long                             progressRefCon;
  248. };
  249. typedef struct ICMProgressProcRecord ICMProgressProcRecord;
  250.  
  251. typedef ICMProgressProcRecord *ICMProgressProcRecordPtr;
  252. struct ICMCompletionProcRecord {
  253.     ICMCompletionUPP                 completionProc;
  254.     long                             completionRefCon;
  255. };
  256. typedef struct ICMCompletionProcRecord ICMCompletionProcRecord;
  257.  
  258. typedef ICMCompletionProcRecord *ICMCompletionProcRecordPtr;
  259. struct ICMDataProcRecord {
  260.     ICMDataUPP                         dataProc;
  261.     long                             dataRefCon;
  262. };
  263. typedef struct ICMDataProcRecord ICMDataProcRecord;
  264.  
  265. typedef ICMDataProcRecord *ICMDataProcRecordPtr;
  266. struct ICMFlushProcRecord {
  267.     ICMFlushUPP                     flushProc;
  268.     long                             flushRefCon;
  269. };
  270. typedef struct ICMFlushProcRecord ICMFlushProcRecord;
  271.  
  272. typedef ICMFlushProcRecord *ICMFlushProcRecordPtr;
  273. struct ICMAlignmentProcRecord {
  274.     ICMAlignmentUPP                 alignmentProc;
  275.     long                             alignmentRefCon;
  276. };
  277. typedef struct ICMAlignmentProcRecord ICMAlignmentProcRecord;
  278.  
  279. typedef ICMAlignmentProcRecord *ICMAlignmentProcRecordPtr;
  280. struct DataRateParams {
  281.     long                             dataRate;
  282.     long                             dataOverrun;
  283.     long                             frameDuration;
  284.     long                             keyFrameRate;
  285.     CodecQ                             minSpatialQuality;
  286.     CodecQ                             minTemporalQuality;
  287. };
  288. typedef struct DataRateParams DataRateParams;
  289.  
  290. typedef DataRateParams *DataRateParamsPtr;
  291. struct ImageDescription {
  292.     long                             idSize;                        /* total size of ImageDescription including extra data ( CLUTs and other per sequence data ) */
  293.     CodecType                         cType;                        /* what kind of codec compressed this data */
  294.     long                             resvd1;                        /* reserved for Apple use */
  295.     short                             resvd2;                        /* reserved for Apple use */
  296.     short                             dataRefIndex;                /* set to zero  */
  297.     short                             version;                    /* which version is this data */
  298.     short                             revisionLevel;                /* what version of that codec did this */
  299.     long                             vendor;                        /* whose  codec compressed this data */
  300.     CodecQ                             temporalQuality;            /* what was the temporal quality factor  */
  301.     CodecQ                             spatialQuality;                /* what was the spatial quality factor */
  302.     short                             width;                        /* how many pixels wide is this data */
  303.     short                             height;                        /* how many pixels high is this data */
  304.     Fixed                             hRes;                        /* horizontal resolution */
  305.     Fixed                             vRes;                        /* vertical resolution */
  306.     long                             dataSize;                    /* if known, the size of data for this image descriptor */
  307.     short                             frameCount;                    /* number of frames this description applies to */
  308.     Str31                             name;                        /* name of codec ( in case not installed )  */
  309.     short                             depth;                        /* what depth is this data (1-32) or ( 33-40 grayscale ) */
  310.     short                             clutID;                        /* clut id or if 0 clut follows  or -1 if no clut */
  311. };
  312. typedef struct ImageDescription ImageDescription;
  313.  
  314. typedef ImageDescription *ImageDescriptionPtr;
  315. typedef ImageDescriptionPtr *ImageDescriptionHandle;
  316. struct CodecInfo {
  317.     Str31                             typeName;                    /* name of the codec type i.e.: 'Apple Image Compression' */
  318.     short                             version;                    /* version of the codec data that this codec knows about */
  319.     short                             revisionLevel;                /* revision level of this codec i.e: 0x00010001 (1.0.1) */
  320.     long                             vendor;                        /* Maker of this codec i.e: 'appl' */
  321.     long                             decompressFlags;            /* codecInfo flags for decompression capabilities */
  322.     long                             compressFlags;                /* codecInfo flags for compression capabilities */
  323.     long                             formatFlags;                /* codecInfo flags for compression format details */
  324.     UInt8                             compressionAccuracy;        /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */
  325.     UInt8                             decompressionAccuracy;        /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */
  326.     unsigned short                     compressionSpeed;            /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown)  */
  327.     unsigned short                     decompressionSpeed;            /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown)  */
  328.     UInt8                             compressionLevel;            /* measure (1-255) of compression level of this codec (0 if unknown)  */
  329.     UInt8                             resvd;                        /* pad */
  330.     short                             minimumHeight;                /* minimum height of image (block size) */
  331.     short                             minimumWidth;                /* minimum width of image (block size) */
  332.     short                             decompressPipelineLatency;    /* in milliseconds ( for asynchronous codecs ) */
  333.     short                             compressPipelineLatency;    /* in milliseconds ( for asynchronous codecs ) */
  334.     long                             privateData;
  335. };
  336. typedef struct CodecInfo CodecInfo;
  337.  
  338. struct CodecNameSpec {
  339.     CodecComponent                     codec;
  340.     CodecType                         cType;
  341.     Str31                             typeName;
  342.     Handle                             name;
  343. };
  344. typedef struct CodecNameSpec CodecNameSpec;
  345.  
  346. struct CodecNameSpecList {
  347.     short                             count;
  348.     CodecNameSpec                     list[1];
  349. };
  350. typedef struct CodecNameSpecList CodecNameSpecList;
  351.  
  352. typedef CodecNameSpecList *CodecNameSpecListPtr;
  353.  
  354. enum {
  355.     defaultDither                = 0,
  356.     forceDither                    = 1,
  357.     suppressDither                = 2,
  358.     useColorMatching            = 4
  359. };
  360.  
  361.  
  362. enum {
  363.     callStdBits                    = 1,
  364.     callOldBits                    = 2,
  365.     noDefaultOpcodes            = 4
  366. };
  367.  
  368.  
  369. enum {
  370.     graphicsModeStraightAlpha    = 256,
  371.     graphicsModePreWhiteAlpha    = 257,
  372.     graphicsModePreBlackAlpha    = 258,
  373.     graphicsModeCompostion        = 259,
  374.     graphicsModeStraightAlphaBlend = 260
  375. };
  376.  
  377.  
  378. enum {
  379.     evenField1ToEvenFieldOut    = 1 << 0,
  380.     evenField1ToOddFieldOut        = 1 << 1,
  381.     oddField1ToEvenFieldOut        = 1 << 2,
  382.     oddField1ToOddFieldOut        = 1 << 3,
  383.     evenField2ToEvenFieldOut    = 1 << 4,
  384.     evenField2ToOddFieldOut        = 1 << 5,
  385.     oddField2ToEvenFieldOut        = 1 << 6,
  386.     oddField2ToOddFieldOut        = 1 << 7
  387. };
  388.  
  389. struct ICMFrameTimeRecord {
  390.     wide                             value;                        /* frame time*/
  391.     long                             scale;                        /* timescale of value/duration fields*/
  392.     void *                            base;                        /* timebase*/
  393.  
  394.     long                             duration;                    /* duration frame is to be displayed (0 if unknown)*/
  395.     Fixed                             rate;                        /* rate of timebase relative to wall-time*/
  396.  
  397.     long                             recordSize;                    /* total number of bytes in ICMFrameTimeRecord*/
  398.  
  399.     long                             frameNumber;                /* number of frame, zero if not known*/
  400. };
  401. typedef struct ICMFrameTimeRecord ICMFrameTimeRecord;
  402.  
  403. typedef ICMFrameTimeRecord *ICMFrameTimePtr;
  404.  
  405. #if GENERATINGCFM
  406. #else
  407. #endif
  408.  
  409. enum {
  410.     uppICMDataProcInfo = kPascalStackBased
  411.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  412.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr *)))
  413.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  414.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  415.     uppICMFlushProcInfo = kPascalStackBased
  416.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  417.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  418.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  419.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  420.     uppICMCompletionProcInfo = kPascalStackBased
  421.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(OSErr)))
  422.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  423.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  424.     uppICMProgressProcInfo = kPascalStackBased
  425.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  426.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  427.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Fixed)))
  428.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  429.     uppStdPixProcInfo = kPascalStackBased
  430.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(PixMap *)))
  431.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Rect *)))
  432.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(MatrixRecord *)))
  433.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  434.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(RgnHandle)))
  435.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(PixMap *)))
  436.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(Rect *)))
  437.          | STACK_ROUTINE_PARAMETER(8, SIZE_CODE(sizeof(short))),
  438.     uppICMAlignmentProcInfo = kPascalStackBased
  439.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Rect *)))
  440.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long))),
  441.     uppICMCursorShieldedProcInfo = kPascalStackBased
  442.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(const Rect *)))
  443.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
  444.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  445.     uppICMMemoryDisposedProcInfo = kPascalStackBased
  446.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  447.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *))),
  448.     uppICMConvertDataFormatProcInfo = kPascalStackBased
  449.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  450.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *)))
  451.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  452.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Handle)))
  453.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void *)))
  454.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long)))
  455.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(void **)))
  456.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(long *)))
  457. };
  458.  
  459. #if GENERATINGCFM
  460. #define NewICMDataProc(userRoutine)        \
  461.         (ICMDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMDataProcInfo, GetCurrentArchitecture())
  462. #define NewICMFlushProc(userRoutine)        \
  463.         (ICMFlushUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMFlushProcInfo, GetCurrentArchitecture())
  464. #define NewICMCompletionProc(userRoutine)        \
  465.         (ICMCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCompletionProcInfo, GetCurrentArchitecture())
  466. #define NewICMProgressProc(userRoutine)        \
  467.         (ICMProgressUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMProgressProcInfo, GetCurrentArchitecture())
  468. #define NewStdPixProc(userRoutine)        \
  469.         (StdPixUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppStdPixProcInfo, GetCurrentArchitecture())
  470. #define NewICMAlignmentProc(userRoutine)        \
  471.         (ICMAlignmentUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMAlignmentProcInfo, GetCurrentArchitecture())
  472. #define NewICMCursorShieldedProc(userRoutine)        \
  473.         (ICMCursorShieldedUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCursorShieldedProcInfo, GetCurrentArchitecture())
  474. #define NewICMMemoryDisposedProc(userRoutine)        \
  475.         (ICMMemoryDisposedUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMMemoryDisposedProcInfo, GetCurrentArchitecture())
  476. #define NewICMConvertDataFormatProc(userRoutine)        \
  477.         (ICMConvertDataFormatUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMConvertDataFormatProcInfo, GetCurrentArchitecture())
  478. #else
  479. #define NewICMDataProc(userRoutine)        \
  480.         ((ICMDataUPP) (userRoutine))
  481. #define NewICMFlushProc(userRoutine)        \
  482.         ((ICMFlushUPP) (userRoutine))
  483. #define NewICMCompletionProc(userRoutine)        \
  484.         ((ICMCompletionUPP) (userRoutine))
  485. #define NewICMProgressProc(userRoutine)        \
  486.         ((ICMProgressUPP) (userRoutine))
  487. #define NewStdPixProc(userRoutine)        \
  488.         ((StdPixUPP) (userRoutine))
  489. #define NewICMAlignmentProc(userRoutine)        \
  490.         ((ICMAlignmentUPP) (userRoutine))
  491. #define NewICMCursorShieldedProc(userRoutine)        \
  492.         ((ICMCursorShieldedUPP) (userRoutine))
  493. #define NewICMMemoryDisposedProc(userRoutine)        \
  494.         ((ICMMemoryDisposedUPP) (userRoutine))
  495. #define NewICMConvertDataFormatProc(userRoutine)        \
  496.         ((ICMConvertDataFormatUPP) (userRoutine))
  497. #endif
  498.  
  499. #if GENERATINGCFM
  500. #define CallICMDataProc(userRoutine, dataP, bytesNeeded, refcon)        \
  501.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMDataProcInfo, (dataP), (bytesNeeded), (refcon))
  502. #define CallICMFlushProc(userRoutine, data, bytesAdded, refcon)        \
  503.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMFlushProcInfo, (data), (bytesAdded), (refcon))
  504. #define CallICMCompletionProc(userRoutine, result, flags, refcon)        \
  505.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMCompletionProcInfo, (result), (flags), (refcon))
  506. #define CallICMProgressProc(userRoutine, message, completeness, refcon)        \
  507.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMProgressProcInfo, (message), (completeness), (refcon))
  508. #define CallStdPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags)        \
  509.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppStdPixProcInfo, (src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
  510. #define CallICMAlignmentProc(userRoutine, rp, refcon)        \
  511.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMAlignmentProcInfo, (rp), (refcon))
  512. #define CallICMCursorShieldedProc(userRoutine, r, refcon, flags)        \
  513.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMCursorShieldedProcInfo, (r), (refcon), (flags))
  514. #define CallICMMemoryDisposedProc(userRoutine, memoryBlock, refcon)        \
  515.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMMemoryDisposedProcInfo, (memoryBlock), (refcon))
  516. #define CallICMConvertDataFormatProc(userRoutine, refCon, flags, desiredFormat, srcData, srcDataSize, dstData, dstDataSize)        \
  517.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMConvertDataFormatProcInfo, (refCon), (flags), (desiredFormat), (srcData), (srcDataSize), (dstData), (dstDataSize))
  518. #else
  519. #define CallICMDataProc(userRoutine, dataP, bytesNeeded, refcon)        \
  520.         (*(userRoutine))((dataP), (bytesNeeded), (refcon))
  521. #define CallICMFlushProc(userRoutine, data, bytesAdded, refcon)        \
  522.         (*(userRoutine))((data), (bytesAdded), (refcon))
  523. #define CallICMCompletionProc(userRoutine, result, flags, refcon)        \
  524.         (*(userRoutine))((result), (flags), (refcon))
  525. #define CallICMProgressProc(userRoutine, message, completeness, refcon)        \
  526.         (*(userRoutine))((message), (completeness), (refcon))
  527. #define CallStdPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags)        \
  528.         (*(userRoutine))((src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
  529. #define CallICMAlignmentProc(userRoutine, rp, refcon)        \
  530.         (*(userRoutine))((rp), (refcon))
  531. #define CallICMCursorShieldedProc(userRoutine, r, refcon, flags)        \
  532.         (*(userRoutine))((r), (refcon), (flags))
  533. #define CallICMMemoryDisposedProc(userRoutine, memoryBlock, refcon)        \
  534.         (*(userRoutine))((memoryBlock), (refcon))
  535. #define CallICMConvertDataFormatProc(userRoutine, refCon, flags, desiredFormat, srcData, srcDataSize, dstData, dstDataSize)        \
  536.         (*(userRoutine))((refCon), (flags), (desiredFormat), (srcData), (srcDataSize), (dstData), (dstDataSize))
  537. #endif
  538. extern pascal OSErr CodecManagerVersion(long *version)
  539.  TWOWORDINLINE(0x7000, 0xAAA3);
  540.  
  541. extern pascal OSErr GetCodecNameList(CodecNameSpecListPtr *list, short showAll)
  542.  TWOWORDINLINE(0x7001, 0xAAA3);
  543.  
  544. extern pascal OSErr DisposeCodecNameList(CodecNameSpecListPtr list)
  545.  TWOWORDINLINE(0x700F, 0xAAA3);
  546.  
  547. extern pascal OSErr GetCodecInfo(CodecInfo *info, CodecType cType, CodecComponent codec)
  548.  TWOWORDINLINE(0x7003, 0xAAA3);
  549.  
  550. extern pascal OSErr GetMaxCompressionSize(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecQ quality, CodecType cType, CompressorComponent codec, long *size)
  551.  TWOWORDINLINE(0x7004, 0xAAA3);
  552.  
  553. extern pascal OSErr GetCSequenceMaxCompressionSize(ImageSequence seqID, PixMapHandle src, long *size)
  554.  FOURWORDINLINE(0x203C, 0x000C, 0x0074, 0xAAA3);
  555.  
  556. extern pascal OSErr GetCompressionTime(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecType cType, CompressorComponent codec, CodecQ *spatialQuality, CodecQ *temporalQuality, unsigned long *compressTime)
  557.  TWOWORDINLINE(0x7005, 0xAAA3);
  558.  
  559. extern pascal OSErr CompressImage(PixMapHandle src, const Rect *srcRect, CodecQ quality, CodecType cType, ImageDescriptionHandle desc, Ptr data)
  560.  TWOWORDINLINE(0x7006, 0xAAA3);
  561.  
  562. extern pascal OSErr FCompressImage(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecQ quality, CodecType cType, CompressorComponent codec, CTabHandle ctable, CodecFlags flags, long bufferSize, ICMFlushProcRecordPtr flushProc, ICMProgressProcRecordPtr progressProc, ImageDescriptionHandle desc, Ptr data)
  563.  TWOWORDINLINE(0x7007, 0xAAA3);
  564.  
  565. extern pascal OSErr DecompressImage(Ptr data, ImageDescriptionHandle desc, PixMapHandle dst, const Rect *srcRect, const Rect *dstRect, short mode, RgnHandle mask)
  566.  TWOWORDINLINE(0x7008, 0xAAA3);
  567.  
  568. extern pascal OSErr FDecompressImage(Ptr data, ImageDescriptionHandle desc, PixMapHandle dst, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, PixMapHandle matte, const Rect *matteRect, CodecQ accuracy, DecompressorComponent codec, long bufferSize, ICMDataProcRecordPtr dataProc, ICMProgressProcRecordPtr progressProc)
  569.  TWOWORDINLINE(0x7009, 0xAAA3);
  570.  
  571. extern pascal OSErr CompressSequenceBegin(ImageSequence *seqID, PixMapHandle src, PixMapHandle prev, const Rect *srcRect, const Rect *prevRect, short colorDepth, CodecType cType, CompressorComponent codec, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate, CTabHandle ctable, CodecFlags flags, ImageDescriptionHandle desc)
  572.  TWOWORDINLINE(0x700A, 0xAAA3);
  573.  
  574. extern pascal OSErr CompressSequenceFrame(ImageSequence seqID, PixMapHandle src, const Rect *srcRect, CodecFlags flags, Ptr data, long *dataSize, UInt8 *similarity, ICMCompletionProcRecordPtr asyncCompletionProc)
  575.  TWOWORDINLINE(0x700B, 0xAAA3);
  576.  
  577. extern pascal OSErr DecompressSequenceBegin(ImageSequence *seqID, ImageDescriptionHandle desc, CGrafPtr port, GDHandle gdh, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, CodecFlags flags, CodecQ accuracy, DecompressorComponent codec)
  578.  TWOWORDINLINE(0x700D, 0xAAA3);
  579.  
  580. extern pascal OSErr DecompressSequenceBeginS(ImageSequence *seqID, ImageDescriptionHandle desc, Ptr data, long dataSize, CGrafPtr port, GDHandle gdh, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, CodecFlags flags, CodecQ accuracy, DecompressorComponent codec)
  581.  FOURWORDINLINE(0x203C, 0x0030, 0x005D, 0xAAA3);
  582.  
  583. extern pascal OSErr DecompressSequenceFrame(ImageSequence seqID, Ptr data, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc)
  584.  TWOWORDINLINE(0x700E, 0xAAA3);
  585.  
  586. extern pascal OSErr DecompressSequenceFrameS(ImageSequence seqID, Ptr data, long dataSize, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc)
  587.  FOURWORDINLINE(0x203C, 0x0016, 0x0047, 0xAAA3);
  588.  
  589. extern pascal OSErr DecompressSequenceFrameWhen(ImageSequence seqID, Ptr data, long dataSize, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc, const ICMFrameTimeRecord *frameTime)
  590.  FOURWORDINLINE(0x203C, 0x001A, 0x005E, 0xAAA3);
  591.  
  592. extern pascal OSErr CDSequenceFlush(ImageSequence seqID)
  593.  FOURWORDINLINE(0x203C, 0x0004, 0x005F, 0xAAA3);
  594.  
  595. extern pascal OSErr SetDSequenceMatrix(ImageSequence seqID, MatrixRecordPtr matrix)
  596.  TWOWORDINLINE(0x7010, 0xAAA3);
  597.  
  598. extern pascal OSErr SetDSequenceMatte(ImageSequence seqID, PixMapHandle matte, const Rect *matteRect)
  599.  TWOWORDINLINE(0x7011, 0xAAA3);
  600.  
  601. extern pascal OSErr SetDSequenceMask(ImageSequence seqID, RgnHandle mask)
  602.  TWOWORDINLINE(0x7012, 0xAAA3);
  603.  
  604. extern pascal OSErr SetDSequenceTransferMode(ImageSequence seqID, short mode, const RGBColor *opColor)
  605.  TWOWORDINLINE(0x7013, 0xAAA3);
  606.  
  607. extern pascal OSErr SetDSequenceDataProc(ImageSequence seqID, ICMDataProcRecordPtr dataProc, long bufferSize)
  608.  TWOWORDINLINE(0x7014, 0xAAA3);
  609.  
  610. extern pascal OSErr SetDSequenceAccuracy(ImageSequence seqID, CodecQ accuracy)
  611.  TWOWORDINLINE(0x7034, 0xAAA3);
  612.  
  613. extern pascal OSErr SetDSequenceSrcRect(ImageSequence seqID, const Rect *srcRect)
  614.  TWOWORDINLINE(0x7035, 0xAAA3);
  615.  
  616. extern pascal OSErr GetDSequenceImageBuffer(ImageSequence seqID, GWorldPtr *gworld)
  617.  TWOWORDINLINE(0x7015, 0xAAA3);
  618.  
  619. extern pascal OSErr GetDSequenceScreenBuffer(ImageSequence seqID, GWorldPtr *gworld)
  620.  TWOWORDINLINE(0x7016, 0xAAA3);
  621.  
  622. extern pascal OSErr SetCSequenceQuality(ImageSequence seqID, CodecQ spatialQuality, CodecQ temporalQuality)
  623.  TWOWORDINLINE(0x7017, 0xAAA3);
  624.  
  625. extern pascal OSErr SetCSequencePrev(ImageSequence seqID, PixMapHandle prev, const Rect *prevRect)
  626.  TWOWORDINLINE(0x7018, 0xAAA3);
  627.  
  628. extern pascal OSErr SetCSequenceFlushProc(ImageSequence seqID, ICMFlushProcRecordPtr flushProc, long bufferSize)
  629.  TWOWORDINLINE(0x7033, 0xAAA3);
  630.  
  631. extern pascal OSErr SetCSequenceKeyFrameRate(ImageSequence seqID, long keyFrameRate)
  632.  TWOWORDINLINE(0x7036, 0xAAA3);
  633.  
  634. extern pascal OSErr GetCSequenceKeyFrameRate(ImageSequence seqID, long *keyFrameRate)
  635.  FOURWORDINLINE(0x203C, 0x0008, 0x004B, 0xAAA3);
  636.  
  637. extern pascal OSErr GetCSequencePrevBuffer(ImageSequence seqID, GWorldPtr *gworld)
  638.  TWOWORDINLINE(0x7019, 0xAAA3);
  639.  
  640. extern pascal OSErr CDSequenceBusy(ImageSequence seqID)
  641.  TWOWORDINLINE(0x701A, 0xAAA3);
  642.  
  643. extern pascal OSErr CDSequenceEnd(ImageSequence seqID)
  644.  TWOWORDINLINE(0x701B, 0xAAA3);
  645.  
  646. extern pascal OSErr CDSequenceEquivalentImageDescription(ImageSequence seqID, ImageDescriptionHandle newDesc, Boolean *equivalent)
  647.  FOURWORDINLINE(0x203C, 0x000C, 0x0065, 0xAAA3);
  648.  
  649. extern pascal OSErr GetCompressedImageSize(ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, long *dataSize)
  650.  TWOWORDINLINE(0x701C, 0xAAA3);
  651.  
  652. extern pascal OSErr GetSimilarity(PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle desc, Ptr data, Fixed *similarity)
  653.  TWOWORDINLINE(0x701D, 0xAAA3);
  654.  
  655. extern pascal OSErr GetImageDescriptionCTable(ImageDescriptionHandle desc, CTabHandle *ctable)
  656.  TWOWORDINLINE(0x701E, 0xAAA3);
  657.  
  658. extern pascal OSErr SetImageDescriptionCTable(ImageDescriptionHandle desc, CTabHandle ctable)
  659.  TWOWORDINLINE(0x701F, 0xAAA3);
  660.  
  661. extern pascal OSErr GetImageDescriptionExtension(ImageDescriptionHandle desc, Handle *extension, long idType, long index)
  662.  TWOWORDINLINE(0x7020, 0xAAA3);
  663.  
  664. extern pascal OSErr AddImageDescriptionExtension(ImageDescriptionHandle desc, Handle extension, long idType)
  665.  TWOWORDINLINE(0x7021, 0xAAA3);
  666.  
  667. extern pascal OSErr RemoveImageDescriptionExtension(ImageDescriptionHandle desc, long idType, long index)
  668.  FOURWORDINLINE(0x203C, 0x000C, 0x003A, 0xAAA3);
  669.  
  670. extern pascal OSErr CountImageDescriptionExtensionType(ImageDescriptionHandle desc, long idType, long *count)
  671.  FOURWORDINLINE(0x203C, 0x000C, 0x003B, 0xAAA3);
  672.  
  673. extern pascal OSErr GetNextImageDescriptionExtensionType(ImageDescriptionHandle desc, long *idType)
  674.  FOURWORDINLINE(0x203C, 0x0008, 0x003C, 0xAAA3);
  675.  
  676. extern pascal OSErr FindCodec(CodecType cType, CodecComponent specCodec, CompressorComponent *compressor, DecompressorComponent *decompressor)
  677.  TWOWORDINLINE(0x7023, 0xAAA3);
  678.  
  679. extern pascal OSErr CompressPicture(PicHandle srcPicture, PicHandle dstPicture, CodecQ quality, CodecType cType)
  680.  TWOWORDINLINE(0x7024, 0xAAA3);
  681.  
  682. extern pascal OSErr FCompressPicture(PicHandle srcPicture, PicHandle dstPicture, short colorDepth, CTabHandle ctable, CodecQ quality, short doDither, short compressAgain, ICMProgressProcRecordPtr progressProc, CodecType cType, CompressorComponent codec)
  683.  TWOWORDINLINE(0x7025, 0xAAA3);
  684.  
  685. extern pascal OSErr CompressPictureFile(short srcRefNum, short dstRefNum, CodecQ quality, CodecType cType)
  686.  TWOWORDINLINE(0x7026, 0xAAA3);
  687.  
  688. extern pascal OSErr FCompressPictureFile(short srcRefNum, short dstRefNum, short colorDepth, CTabHandle ctable, CodecQ quality, short doDither, short compressAgain, ICMProgressProcRecordPtr progressProc, CodecType cType, CompressorComponent codec)
  689.  TWOWORDINLINE(0x7027, 0xAAA3);
  690.  
  691. extern pascal OSErr GetPictureFileHeader(short refNum, Rect *frame, OpenCPicParams *header)
  692.  TWOWORDINLINE(0x7028, 0xAAA3);
  693.  
  694. extern pascal OSErr DrawPictureFile(short refNum, const Rect *frame, ICMProgressProcRecordPtr progressProc)
  695.  TWOWORDINLINE(0x7029, 0xAAA3);
  696.  
  697. extern pascal OSErr DrawTrimmedPicture(PicHandle srcPicture, const Rect *frame, RgnHandle trimMask, short doDither, ICMProgressProcRecordPtr progressProc)
  698.  TWOWORDINLINE(0x702E, 0xAAA3);
  699.  
  700. extern pascal OSErr DrawTrimmedPictureFile(short srcRefnum, const Rect *frame, RgnHandle trimMask, short doDither, ICMProgressProcRecordPtr progressProc)
  701.  TWOWORDINLINE(0x702F, 0xAAA3);
  702.  
  703. extern pascal OSErr MakeThumbnailFromPicture(PicHandle picture, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  704.  TWOWORDINLINE(0x702A, 0xAAA3);
  705.  
  706. extern pascal OSErr MakeThumbnailFromPictureFile(short refNum, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  707.  TWOWORDINLINE(0x702B, 0xAAA3);
  708.  
  709. extern pascal OSErr MakeThumbnailFromPixMap(PixMapHandle src, const Rect *srcRect, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  710.  TWOWORDINLINE(0x702C, 0xAAA3);
  711.  
  712. extern pascal OSErr TrimImage(ImageDescriptionHandle desc, Ptr inData, long inBufferSize, ICMDataProcRecordPtr dataProc, Ptr outData, long outBufferSize, ICMFlushProcRecordPtr flushProc, Rect *trimRect, ICMProgressProcRecordPtr progressProc)
  713.  TWOWORDINLINE(0x702D, 0xAAA3);
  714.  
  715. extern pascal OSErr ConvertImage(ImageDescriptionHandle srcDD, Ptr srcData, short colorDepth, CTabHandle ctable, CodecQ accuracy, CodecQ quality, CodecType cType, CodecComponent codec, ImageDescriptionHandle dstDD, Ptr dstData)
  716.  TWOWORDINLINE(0x7030, 0xAAA3);
  717.  
  718. extern pascal OSErr GetCompressedPixMapInfo(PixMapPtr pix, ImageDescriptionHandle *desc, Ptr *data, long *bufferSize, ICMDataProcRecord *dataProc, ICMProgressProcRecord *progressProc)
  719.  TWOWORDINLINE(0x7037, 0xAAA3);
  720.  
  721. extern pascal OSErr SetCompressedPixMapInfo(PixMapPtr pix, ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, ICMProgressProcRecordPtr progressProc)
  722.  TWOWORDINLINE(0x7038, 0xAAA3);
  723.  
  724. extern pascal void StdPix(PixMapPtr src, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, PixMapPtr matte, const Rect *matteRect, short flags)
  725.  TWOWORDINLINE(0x700C, 0xAAA3);
  726.  
  727. extern pascal OSErr TransformRgn(MatrixRecordPtr matrix, RgnHandle rgn)
  728.  TWOWORDINLINE(0x7039, 0xAAA3);
  729.  
  730. /*
  731. **********
  732.     preview stuff
  733. **********
  734. */
  735. extern pascal void SFGetFilePreview(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, DlgHookUPP dlgHook, SFReply *reply)
  736.  TWOWORDINLINE(0x7041, 0xAAA3);
  737.  
  738. extern pascal void SFPGetFilePreview(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, DlgHookUPP dlgHook, SFReply *reply, short dlgID, ModalFilterUPP filterProc)
  739.  TWOWORDINLINE(0x7042, 0xAAA3);
  740.  
  741. extern pascal void StandardGetFilePreview(FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, StandardFileReply *reply)
  742.  TWOWORDINLINE(0x7043, 0xAAA3);
  743.  
  744. extern pascal void CustomGetFilePreview(FileFilterYDUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, StandardFileReply *reply, short dlgID, Point where, DlgHookYDUPP dlgHook, ModalFilterYDUPP filterProc, ActivationOrderListPtr activeList, ActivateYDUPP activateProc, void *yourDataPtr)
  745.  TWOWORDINLINE(0x7044, 0xAAA3);
  746.  
  747. extern pascal OSErr MakeFilePreview(short resRefNum, ICMProgressProcRecordPtr progress)
  748.  TWOWORDINLINE(0x7045, 0xAAA3);
  749.  
  750. extern pascal OSErr AddFilePreview(short resRefNum, OSType previewType, Handle previewData)
  751.  TWOWORDINLINE(0x7046, 0xAAA3);
  752.  
  753.  
  754. enum {
  755.     sfpItemPreviewAreaUser        = 11,
  756.     sfpItemPreviewStaticText    = 12,
  757.     sfpItemPreviewDividerUser    = 13,
  758.     sfpItemCreatePreviewButton    = 14,
  759.     sfpItemShowPreviewButton    = 15
  760. };
  761.  
  762. struct PreviewResourceRecord {
  763.     unsigned long                     modDate;
  764.     short                             version;
  765.     OSType                             resType;
  766.     short                             resID;
  767. };
  768. typedef struct PreviewResourceRecord PreviewResourceRecord;
  769.  
  770. typedef PreviewResourceRecord *PreviewResourcePtr;
  771. typedef PreviewResourcePtr *PreviewResource;
  772. extern pascal void AlignScreenRect(Rect *rp, ICMAlignmentProcRecordPtr alignmentProc)
  773.  FOURWORDINLINE(0x203C, 0x0008, 0x004C, 0xAAA3);
  774.  
  775. extern pascal void AlignWindow(WindowPtr wp, Boolean front, const Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  776.  FOURWORDINLINE(0x203C, 0x000E, 0x004D, 0xAAA3);
  777.  
  778. extern pascal void DragAlignedWindow(WindowPtr wp, Point startPt, Rect *boundsRect, Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  779.  FOURWORDINLINE(0x203C, 0x0014, 0x004E, 0xAAA3);
  780.  
  781. extern pascal long DragAlignedGrayRgn(RgnHandle theRgn, Point startPt, Rect *boundsRect, Rect *slopRect, short axis, UniversalProcPtr actionProc, Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  782.  FOURWORDINLINE(0x203C, 0x001E, 0x004F, 0xAAA3);
  783.  
  784. extern pascal OSErr SetCSequenceDataRateParams(ImageSequence seqID, DataRateParamsPtr params)
  785.  FOURWORDINLINE(0x203C, 0x0008, 0x0050, 0xAAA3);
  786.  
  787. extern pascal OSErr SetCSequenceFrameNumber(ImageSequence seqID, long frameNumber)
  788.  FOURWORDINLINE(0x203C, 0x0008, 0x0051, 0xAAA3);
  789.  
  790. extern pascal OSErr SetCSequencePreferredPacketSize(ImageSequence seqID, long preferredPacketSizeInBytes)
  791.  FOURWORDINLINE(0x203C, 0x0008, 0x0078, 0xAAA3);
  792.  
  793. extern pascal OSErr NewImageGWorld(GWorldPtr *gworld, ImageDescriptionHandle idh, GWorldFlags flags)
  794.  FOURWORDINLINE(0x203C, 0x000C, 0x0052, 0xAAA3);
  795.  
  796. extern pascal OSErr GetCSequenceDataRateParams(ImageSequence seqID, DataRateParamsPtr params)
  797.  FOURWORDINLINE(0x203C, 0x0008, 0x0053, 0xAAA3);
  798.  
  799. extern pascal OSErr GetCSequenceFrameNumber(ImageSequence seqID, long *frameNumber)
  800.  FOURWORDINLINE(0x203C, 0x0008, 0x0054, 0xAAA3);
  801.  
  802. extern pascal OSErr GetBestDeviceRect(GDHandle *gdh, Rect *rp)
  803.  FOURWORDINLINE(0x203C, 0x0008, 0x0055, 0xAAA3);
  804.  
  805. extern pascal OSErr SetSequenceProgressProc(ImageSequence seqID, ICMProgressProcRecord *progressProc)
  806.  FOURWORDINLINE(0x203C, 0x0008, 0x0056, 0xAAA3);
  807.  
  808. extern pascal OSErr GDHasScale(GDHandle gdh, short depth, Fixed *scale)
  809.  FOURWORDINLINE(0x203C, 0x000A, 0x005A, 0xAAA3);
  810.  
  811. extern pascal OSErr GDGetScale(GDHandle gdh, Fixed *scale, short *flags)
  812.  FOURWORDINLINE(0x203C, 0x000C, 0x005B, 0xAAA3);
  813.  
  814. extern pascal OSErr GDSetScale(GDHandle gdh, Fixed scale, short flags)
  815.  FOURWORDINLINE(0x203C, 0x000A, 0x005C, 0xAAA3);
  816.  
  817. extern pascal OSErr ICMShieldSequenceCursor(ImageSequence seqID)
  818.  FOURWORDINLINE(0x203C, 0x0004, 0x0062, 0xAAA3);
  819.  
  820. extern pascal void ICMDecompressComplete(ImageSequence seqID, OSErr err, short flag, ICMCompletionProcRecordPtr completionRtn)
  821.  FOURWORDINLINE(0x203C, 0x000C, 0x0063, 0xAAA3);
  822.  
  823. extern pascal OSErr SetDSequenceTimeCode(ImageSequence seqID, void *timeCodeFormat, void *timeCodeTime)
  824.  FOURWORDINLINE(0x203C, 0x000C, 0x0064, 0xAAA3);
  825.  
  826. extern pascal OSErr CDSequenceNewMemory(ImageSequence seqID, Ptr *data, Size dataSize, long dataUse, ICMMemoryDisposedUPP memoryGoneProc, void *refCon)
  827.  FOURWORDINLINE(0x203C, 0x0018, 0x0066, 0xAAA3);
  828.  
  829. extern pascal OSErr CDSequenceDisposeMemory(ImageSequence seqID, Ptr data)
  830.  FOURWORDINLINE(0x203C, 0x0008, 0x0067, 0xAAA3);
  831.  
  832. extern pascal OSErr CDSequenceNewDataSource(ImageSequence seqID, ImageSequenceDataSource *sourceID, OSType sourceType, long sourceInputNumber, Handle dataDescription, void *transferProc, void *refCon)
  833.  FOURWORDINLINE(0x203C, 0x001C, 0x0068, 0xAAA3);
  834.  
  835. extern pascal OSErr CDSequenceDisposeDataSource(ImageSequenceDataSource sourceID)
  836.  FOURWORDINLINE(0x203C, 0x0004, 0x0069, 0xAAA3);
  837.  
  838. extern pascal OSErr CDSequenceSetSourceData(ImageSequenceDataSource sourceID, void *data, long dataSize)
  839.  FOURWORDINLINE(0x203C, 0x000C, 0x006A, 0xAAA3);
  840.  
  841. extern pascal OSErr CDSequenceChangedSourceData(ImageSequenceDataSource sourceID)
  842.  FOURWORDINLINE(0x203C, 0x0004, 0x006B, 0xAAA3);
  843.  
  844. extern pascal OSErr PtInDSequenceData(ImageSequence seqID, void *data, Size dataSize, Point where, Boolean *hit)
  845.  FOURWORDINLINE(0x203C, 0x0014, 0x006C, 0xAAA3);
  846.  
  847. extern pascal OSErr GetGraphicsImporterForFile(const FSSpec *theFile, ComponentInstance *gi)
  848.  FOURWORDINLINE(0x203C, 0x0008, 0x006E, 0xAAA3);
  849.  
  850. extern pascal OSErr GetGraphicsImporterForDataRef(Handle dataRef, OSType dataRefType, ComponentInstance *gi)
  851.  FOURWORDINLINE(0x203C, 0x000C, 0x0077, 0xAAA3);
  852.  
  853. extern pascal OSErr ImageTranscodeSequenceBegin(ImageTranscodeSequence *its, ImageDescriptionHandle srcDesc, OSType destType, ImageDescriptionHandle *dstDesc, void *data, long dataSize)
  854.  FOURWORDINLINE(0x203C, 0x0018, 0x006F, 0xAAA3);
  855.  
  856. extern pascal OSErr ImageTranscodeSequenceEnd(ImageTranscodeSequence its)
  857.  FOURWORDINLINE(0x203C, 0x0004, 0x0070, 0xAAA3);
  858.  
  859. extern pascal OSErr ImageTranscodeFrame(ImageTranscodeSequence its, void *srcData, long srcDataSize, void **dstData, long *dstDataSize)
  860.  FOURWORDINLINE(0x203C, 0x0014, 0x0071, 0xAAA3);
  861.  
  862. extern pascal OSErr ImageTranscodeDisposeFrameData(ImageTranscodeSequence its, void *dstData)
  863.  FOURWORDINLINE(0x203C, 0x0008, 0x0072, 0xAAA3);
  864.  
  865. extern pascal OSErr CDSequenceInvalidate(ImageSequence seqID, RgnHandle invalRgn)
  866.  FOURWORDINLINE(0x203C, 0x0008, 0x0073, 0xAAA3);
  867.  
  868. extern pascal OSErr ImageFieldSequenceBegin(ImageFieldSequence *ifs, ImageDescriptionHandle desc1, ImageDescriptionHandle desc2, ImageDescriptionHandle descOut)
  869.  FOURWORDINLINE(0x203C, 0x0010, 0x006D, 0xAAA3);
  870.  
  871. extern pascal OSErr ImageFieldSequenceExtractCombine(ImageFieldSequence ifs, long fieldFlags, void *data1, long dataSize1, void *data2, long dataSize2, void *outputData, long *outDataSize)
  872.  FOURWORDINLINE(0x203C, 0x0020, 0x0075, 0xAAA3);
  873.  
  874. extern pascal OSErr ImageFieldSequenceEnd(ImageFieldSequence ifs)
  875.  FOURWORDINLINE(0x203C, 0x0004, 0x0076, 0xAAA3);
  876.  
  877.  
  878. enum {
  879.     identityMatrixType            = 0x00,                            /* result if matrix is identity */
  880.     translateMatrixType            = 0x01,                            /* result if matrix translates */
  881.     scaleMatrixType                = 0x02,                            /* result if matrix scales */
  882.     scaleTranslateMatrixType    = 0x03,                            /* result if matrix scales and translates */
  883.     linearMatrixType            = 0x04,                            /* result if matrix is general 2 x 2 */
  884.     linearTranslateMatrixType    = 0x05,                            /* result if matrix is general 2 x 2 and translates */
  885.     perspectiveMatrixType        = 0x06                            /* result if matrix is general 3 x 3 */
  886. };
  887.  
  888. typedef unsigned short MatrixFlags;
  889. extern pascal short GetMatrixType(const MatrixRecord *m)
  890.  TWOWORDINLINE(0x7014, 0xABC2);
  891.  
  892. extern pascal void CopyMatrix(const MatrixRecord *m1, MatrixRecord *m2)
  893.  TWOWORDINLINE(0x7020, 0xABC2);
  894.  
  895. extern pascal Boolean EqualMatrix(const MatrixRecord *m1, const MatrixRecord *m2)
  896.  TWOWORDINLINE(0x7021, 0xABC2);
  897.  
  898. extern pascal void SetIdentityMatrix(MatrixRecord *matrix)
  899.  TWOWORDINLINE(0x7015, 0xABC2);
  900.  
  901. extern pascal void TranslateMatrix(MatrixRecord *m, Fixed deltaH, Fixed deltaV)
  902.  TWOWORDINLINE(0x7019, 0xABC2);
  903.  
  904. extern pascal void RotateMatrix(MatrixRecord *m, Fixed degrees, Fixed aboutX, Fixed aboutY)
  905.  TWOWORDINLINE(0x7016, 0xABC2);
  906.  
  907. extern pascal void ScaleMatrix(MatrixRecord *m, Fixed scaleX, Fixed scaleY, Fixed aboutX, Fixed aboutY)
  908.  TWOWORDINLINE(0x7017, 0xABC2);
  909.  
  910. extern pascal void SkewMatrix(MatrixRecord *m, Fixed skewX, Fixed skewY, Fixed aboutX, Fixed aboutY)
  911.  TWOWORDINLINE(0x7018, 0xABC2);
  912.  
  913. extern pascal OSErr TransformFixedPoints(const MatrixRecord *m, FixedPoint *fpt, long count)
  914.  TWOWORDINLINE(0x7022, 0xABC2);
  915.  
  916. extern pascal OSErr TransformPoints(const MatrixRecord *mp, Point *pt1, long count)
  917.  TWOWORDINLINE(0x7023, 0xABC2);
  918.  
  919. extern pascal Boolean TransformFixedRect(const MatrixRecord *m, FixedRect *fr, FixedPoint *fpp)
  920.  TWOWORDINLINE(0x7024, 0xABC2);
  921.  
  922. extern pascal Boolean TransformRect(const MatrixRecord *m, Rect *r, FixedPoint *fpp)
  923.  TWOWORDINLINE(0x7025, 0xABC2);
  924.  
  925. extern pascal Boolean InverseMatrix(const MatrixRecord *m, MatrixRecord *im)
  926.  TWOWORDINLINE(0x701C, 0xABC2);
  927.  
  928. extern pascal void ConcatMatrix(const MatrixRecord *a, MatrixRecord *b)
  929.  TWOWORDINLINE(0x701B, 0xABC2);
  930.  
  931. extern pascal void RectMatrix(MatrixRecord *matrix, const Rect *srcRect, const Rect *dstRect)
  932.  TWOWORDINLINE(0x701E, 0xABC2);
  933.  
  934. extern pascal void MapMatrix(MatrixRecord *matrix, const Rect *fromRect, const Rect *toRect)
  935.  TWOWORDINLINE(0x701D, 0xABC2);
  936.  
  937. extern pascal void CompAdd(wide *src, wide *dst)
  938.  TWOWORDINLINE(0x7001, 0xABC2);
  939.  
  940. extern pascal void CompSub(wide *src, wide *dst)
  941.  TWOWORDINLINE(0x7002, 0xABC2);
  942.  
  943. extern pascal void CompNeg(wide *dst)
  944.  TWOWORDINLINE(0x7003, 0xABC2);
  945.  
  946. extern pascal void CompShift(wide *src, short shift)
  947.  TWOWORDINLINE(0x7004, 0xABC2);
  948.  
  949. extern pascal void CompMul(long src1, long src2, wide *dst)
  950.  TWOWORDINLINE(0x7005, 0xABC2);
  951.  
  952. extern pascal long CompDiv(wide *numerator, long denominator, long *remainder)
  953.  TWOWORDINLINE(0x7006, 0xABC2);
  954.  
  955. extern pascal void CompFixMul(wide *compSrc, Fixed fixSrc, wide *compDst)
  956.  TWOWORDINLINE(0x7007, 0xABC2);
  957.  
  958. extern pascal void CompMulDiv(wide *co, long mul, long divisor)
  959.  TWOWORDINLINE(0x7008, 0xABC2);
  960.  
  961. extern pascal void CompMulDivTrunc(wide *co, long mul, long divisor, long *remainder)
  962.  TWOWORDINLINE(0x700C, 0xABC2);
  963.  
  964. extern pascal long CompCompare(wide *a, wide *minusb)
  965.  TWOWORDINLINE(0x7009, 0xABC2);
  966.  
  967. extern pascal Fixed FixMulDiv(Fixed src, Fixed mul, Fixed divisor)
  968.  TWOWORDINLINE(0x700A, 0xABC2);
  969.  
  970. extern pascal Fixed UnsignedFixMulDiv(Fixed src, Fixed mul, Fixed divisor)
  971.  TWOWORDINLINE(0x700D, 0xABC2);
  972.  
  973. extern pascal Fract FracSinCos(Fixed degree, Fract *cosOut)
  974.  TWOWORDINLINE(0x700B, 0xABC2);
  975.  
  976. extern pascal Fixed FixExp2(Fixed src)
  977.  TWOWORDINLINE(0x700E, 0xABC2);
  978.  
  979. extern pascal Fixed FixLog2(Fixed src)
  980.  TWOWORDINLINE(0x700F, 0xABC2);
  981.  
  982. extern pascal Fixed FixPow(Fixed base, Fixed exp)
  983.  TWOWORDINLINE(0x7010, 0xABC2);
  984.  
  985. typedef ComponentInstance GraphicsImportComponent;
  986.  
  987. enum {
  988.     GraphicsImporterComponentType = 'grip'
  989. };
  990.  
  991. /** These are GraphicsImport procedures **/
  992. extern pascal ComponentResult GraphicsImportSetDataReference(GraphicsImportComponent ci, Handle dataRef, OSType dataReType)
  993.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
  994.  
  995. extern pascal ComponentResult GraphicsImportGetDataReference(GraphicsImportComponent ci, Handle *dataRef, OSType *dataReType)
  996.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
  997.  
  998. extern pascal ComponentResult GraphicsImportSetDataFile(GraphicsImportComponent ci, const FSSpec *theFile)
  999.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  1000.  
  1001. extern pascal ComponentResult GraphicsImportGetDataFile(GraphicsImportComponent ci, FSSpec *theFile)
  1002.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
  1003.  
  1004. extern pascal ComponentResult GraphicsImportSetDataHandle(GraphicsImportComponent ci, Handle h)
  1005.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
  1006.  
  1007. extern pascal ComponentResult GraphicsImportGetDataHandle(GraphicsImportComponent ci, Handle *h)
  1008.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
  1009.  
  1010. extern pascal ComponentResult GraphicsImportGetImageDescription(GraphicsImportComponent ci, ImageDescriptionHandle *desc)
  1011.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  1012.  
  1013. extern pascal ComponentResult GraphicsImportGetDataOffsetAndSize(GraphicsImportComponent ci, unsigned long *offset, unsigned long *size)
  1014.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  1015.  
  1016. extern pascal ComponentResult GraphicsImportReadData(GraphicsImportComponent ci, void *dataPtr, unsigned long dataOffset, unsigned long dataSize)
  1017.  FIVEWORDINLINE(0x2F3C, 0x000C, 0x0009, 0x7000, 0xA82A);
  1018.  
  1019. extern pascal ComponentResult GraphicsImportSetClip(GraphicsImportComponent ci, RgnHandle clipRgn)
  1020.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x000A, 0x7000, 0xA82A);
  1021.  
  1022. extern pascal ComponentResult GraphicsImportGetClip(GraphicsImportComponent ci, RgnHandle *clipRgn)
  1023.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x000B, 0x7000, 0xA82A);
  1024.  
  1025. extern pascal ComponentResult GraphicsImportSetSourceRect(GraphicsImportComponent ci, const Rect *sourceRect)
  1026.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
  1027.  
  1028. extern pascal ComponentResult GraphicsImportGetSourceRect(GraphicsImportComponent ci, Rect *sourceRect)
  1029.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
  1030.  
  1031. extern pascal ComponentResult GraphicsImportGetNaturalBounds(GraphicsImportComponent ci, Rect *naturalBounds)
  1032.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
  1033.  
  1034. extern pascal ComponentResult GraphicsImportDraw(GraphicsImportComponent ci)
  1035.  FIVEWORDINLINE(0x2F3C, 0x0000, 0x000F, 0x7000, 0xA82A);
  1036.  
  1037. extern pascal ComponentResult GraphicsImportSetGWorld(GraphicsImportComponent ci, CGrafPtr port, GDHandle gd)
  1038.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0010, 0x7000, 0xA82A);
  1039.  
  1040. extern pascal ComponentResult GraphicsImportGetGWorld(GraphicsImportComponent ci, CGrafPtr *port, GDHandle *gd)
  1041.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0011, 0x7000, 0xA82A);
  1042.  
  1043. extern pascal ComponentResult GraphicsImportSetMatrix(GraphicsImportComponent ci, const MatrixRecord *matrix)
  1044.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
  1045.  
  1046. extern pascal ComponentResult GraphicsImportGetMatrix(GraphicsImportComponent ci, MatrixRecord *matrix)
  1047.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
  1048.  
  1049. extern pascal ComponentResult GraphicsImportSetBoundsRect(GraphicsImportComponent ci, const Rect *bounds)
  1050.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
  1051.  
  1052. extern pascal ComponentResult GraphicsImportGetBoundsRect(GraphicsImportComponent ci, Rect *bounds)
  1053.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
  1054.  
  1055. extern pascal ComponentResult GraphicsImportSaveAsPicture(GraphicsImportComponent ci, const FSSpec *fss, ScriptCode scriptTag)
  1056.  FIVEWORDINLINE(0x2F3C, 0x0006, 0x0016, 0x7000, 0xA82A);
  1057.  
  1058. extern pascal ComponentResult GraphicsImportSetGraphicsMode(GraphicsImportComponent ci, long graphicsMode, const RGBColor *opColor)
  1059.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0017, 0x7000, 0xA82A);
  1060.  
  1061. extern pascal ComponentResult GraphicsImportGetGraphicsMode(GraphicsImportComponent ci, long *graphicsMode, RGBColor *opColor)
  1062.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0018, 0x7000, 0xA82A);
  1063.  
  1064. extern pascal ComponentResult GraphicsImportSetQuality(GraphicsImportComponent ci, CodecQ quality)
  1065.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
  1066.  
  1067. extern pascal ComponentResult GraphicsImportGetQuality(GraphicsImportComponent ci, CodecQ *quality)
  1068.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
  1069.  
  1070. extern pascal ComponentResult GraphicsImportSaveAsQuickTimeImageFile(GraphicsImportComponent ci, const FSSpec *fss, ScriptCode scriptTag)
  1071.  FIVEWORDINLINE(0x2F3C, 0x0006, 0x001B, 0x7000, 0xA82A);
  1072.  
  1073. extern pascal ComponentResult GraphicsImportSetDataReferenceOffsetAndLimit(GraphicsImportComponent ci, unsigned long offset, unsigned long limit)
  1074.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x001C, 0x7000, 0xA82A);
  1075.  
  1076. extern pascal ComponentResult GraphicsImportGetDataReferenceOffsetAndLimit(GraphicsImportComponent ci, unsigned long *offset, unsigned long *limit)
  1077.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x001D, 0x7000, 0xA82A);
  1078.  
  1079. extern pascal ComponentResult GraphicsImportGetAliasedDataReference(GraphicsImportComponent ci, Handle *dataRef, OSType *dataRefType)
  1080.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x001E, 0x7000, 0xA82A);
  1081.  
  1082. extern pascal ComponentResult GraphicsImportValidate(GraphicsImportComponent ci, Boolean *valid)
  1083.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
  1084.  
  1085. typedef ComponentInstance ImageTranscoderComponent;
  1086.  
  1087. enum {
  1088.     ImageTranscodererComponentType = 'imtc'
  1089. };
  1090.  
  1091. /** These are ImageTranscoder procedures **/
  1092. extern pascal ComponentResult ImageTranscoderBeginSequence(ImageTranscoderComponent itc, ImageDescriptionHandle srcDesc, ImageDescriptionHandle *dstDesc, void *data, long dataSize)
  1093.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x0001, 0x7000, 0xA82A);
  1094.  
  1095. extern pascal ComponentResult ImageTranscoderConvert(ImageTranscoderComponent itc, void *srcData, long srcDataSize, void **dstData, long *dstDataSize)
  1096.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x0002, 0x7000, 0xA82A);
  1097.  
  1098. extern pascal ComponentResult ImageTranscoderDisposeData(ImageTranscoderComponent itc, void *dstData)
  1099.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  1100.  
  1101. extern pascal ComponentResult ImageTranscoderEndSequence(ImageTranscoderComponent itc)
  1102.  FIVEWORDINLINE(0x2F3C, 0x0000, 0x0004, 0x7000, 0xA82A);
  1103.  
  1104. /* UPP call backs */
  1105.  
  1106. /* selectors for component calls */
  1107. enum {
  1108.     kGraphicsImportSetDataReferenceSelect            = 0x0001,
  1109.     kGraphicsImportGetDataReferenceSelect            = 0x0002,
  1110.     kGraphicsImportSetDataFileSelect                = 0x0003,
  1111.     kGraphicsImportGetDataFileSelect                = 0x0004,
  1112.     kGraphicsImportSetDataHandleSelect                = 0x0005,
  1113.     kGraphicsImportGetDataHandleSelect                = 0x0006,
  1114.     kGraphicsImportGetImageDescriptionSelect        = 0x0007,
  1115.     kGraphicsImportGetDataOffsetAndSizeSelect        = 0x0008,
  1116.     kGraphicsImportReadDataSelect                    = 0x0009,
  1117.     kGraphicsImportSetClipSelect                    = 0x000A,
  1118.     kGraphicsImportGetClipSelect                    = 0x000B,
  1119.     kGraphicsImportSetSourceRectSelect                = 0x000C,
  1120.     kGraphicsImportGetSourceRectSelect                = 0x000D,
  1121.     kGraphicsImportGetNaturalBoundsSelect            = 0x000E,
  1122.     kGraphicsImportDrawSelect                        = 0x000F,
  1123.     kGraphicsImportSetGWorldSelect                    = 0x0010,
  1124.     kGraphicsImportGetGWorldSelect                    = 0x0011,
  1125.     kGraphicsImportSetMatrixSelect                    = 0x0012,
  1126.     kGraphicsImportGetMatrixSelect                    = 0x0013,
  1127.     kGraphicsImportSetBoundsRectSelect                = 0x0014,
  1128.     kGraphicsImportGetBoundsRectSelect                = 0x0015,
  1129.     kGraphicsImportSaveAsPictureSelect                = 0x0016,
  1130.     kGraphicsImportSetGraphicsModeSelect            = 0x0017,
  1131.     kGraphicsImportGetGraphicsModeSelect            = 0x0018,
  1132.     kGraphicsImportSetQualitySelect                    = 0x0019,
  1133.     kGraphicsImportGetQualitySelect                    = 0x001A,
  1134.     kGraphicsImportSaveAsQuickTimeImageFileSelect    = 0x001B,
  1135.     kGraphicsImportSetDataReferenceOffsetAndLimitSelect = 0x001C,
  1136.     kGraphicsImportGetDataReferenceOffsetAndLimitSelect = 0x001D,
  1137.     kGraphicsImportGetAliasedDataReferenceSelect    = 0x001E,
  1138.     kGraphicsImportValidateSelect                    = 0x001F,
  1139.     kImageTranscoderBeginSequenceSelect                = 0x0001,
  1140.     kImageTranscoderConvertSelect                    = 0x0002,
  1141.     kImageTranscoderDisposeDataSelect                = 0x0003,
  1142.     kImageTranscoderEndSequenceSelect                = 0x0004
  1143. };
  1144.  
  1145. #if PRAGMA_ALIGN_SUPPORTED
  1146. #pragma options align=reset
  1147. #endif
  1148.  
  1149. #if PRAGMA_IMPORT_SUPPORTED
  1150. #pragma import off
  1151. #endif
  1152.  
  1153. #ifdef __cplusplus
  1154. }
  1155. #endif
  1156.  
  1157. #endif /* __IMAGECOMPRESSION__ */
  1158.  
  1159.